home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-09-17 | 5.9 KB | 150 lines | [TEXT/MPS ] |
- *********************************************
- MACPP VIEWS SUPPORT IN ODF 1 • RELEASE NOTES
- *********************************************
-
- These release notes cover the MacApp views support in ODF. This is a technical
- complement to the ReadMe files "Q & A" and "User Guide" which should be read first.
- In particular the "User Guide" explains how to add MacApp support to your part
- and how to support custom classes.
-
- MACAPP READER MODULE
- --------------------
-
- We call "MacApp Reader" the code contained in the 2 source files FWMARead.cpp and
- FWMAObjs.cpp.
-
- FWMARead.cpp implements the static class FW_CMacAppReader whose job is to parse
- the View resource stream, and for each view create a temporary object and then
- create the converted ODF view. FWMAObjs.cpp implements the classes for these
- temporary objects, with a root class FW_CMAObject.
-
- MACAPP WARNING
- --------------
-
- When loading a MacApp view you may get the following debugger break:
-
- "FW_CMacAppReader::ReadStreamObject: Unknown delimiter in resource stream"
-
- which leads to the following error message in ViewTester:
-
- "Error reading MacApp 'View' resource ID xxx: found invalid data or couldn't
- skip unknown view!
-
- In that case the MacApp Reader throws an exception and aborts reading further.
- This is due to the fact that it was unable to jump over an unknown view object
- because the object size was invalid in the resource stream. The MacApp team
- is aware of this problem and is addressing it for a future version. In the
- mean time you have 2 solutions:
-
- 1) make sure that the MacApp resource file was generated by Ad Lib and not directly
- by Rez compiling a .r file (if this is the case load it first in Ad Lib and save
- it back). And Ad Lib file has more chances to contain valid information.
-
- 2) See in ViewTester what views were created, the last one created should be the
- offending one. Edit the file in Ad Lib and modify the views until this error
- disappears.
-
-
- SUPPORTED MACAPP CLASSES
- ------------------------
-
- The following class conversion occurs when reading a View resource:
-
- MacApp class ODF class
- +++++++++++++++++++++++++++++++++++++++++++++
- TButton FW_CButton
- TCheckBox FW_CButton
- TCluster FW_CGroupBox
- TDialogBehavior (used to set the default & cancel buttons)
- TDialogView (sets frame's bounds & default/cancel buttons)
- TEditText FW_CEditView
- TPicture FW_CPictSView
- TPopup FW_CPopupMenu
- TScroller FW_CScrollBarScroller
- TStaticText FW_CStaticText
- TRadio FW_CButton
- TTEView FW_CEditView
- TTextGridView FW_CListBox
- TTextListView FW_CListBox
- TWindow (sets frame's bounds & creates grow box)
-
- All other classes are not registered in FW_CMacAppReader::RegisterAllMacAppClasses()
- and thus will be converted to ODF "unknown" views by default, unless your
- part registers them and provides the code to convert them.
-
- Note: it is not possible to create pure TView or TControl object.
-
- CONVERSION RULES & LIMITATIONS
- ------------------------------
-
- ODF views are restricted to 16-bit coordinates. When reading coordinates or
- sizes greater than 16-bit the MacApp reader gives a debugger warning:
- "MacAppReader Warning: found a view out of 16 bit space. ODF will adjust its bounds."
- It resets large coordinates to 0 and large sizes to 16K.
-
- MacApp adorners and behaviors are not supported. They are ignored except for
- TDialogBehavior which is used to set the default and cancel buttons.
-
- MacApp doesn't define any specific tabber object so you must create the
- ViewTabber in your PostCreateViewFromStream method.
-
-
- TView classes have the following conversion rules and limitations:
- (class fields are named as they appear in the Ad Lib class editors)
-
- • TView fields:
- Only the view ID and coordinates are used. All other fields are ignored
- including the size determiners (ODF views are created with their default
- binding flags)
- When a TView object is the first view inside a scroller its bounds are changed to
- match the scroller's bounds.
-
- • TScroller fields:
- An ODF frame can use only one scrolling view for its content (the content view).
- The first scrolling view is converted into the content view and additional
- scrollers generate a warning and are ignored by ODF. (However you can handle
- scrolling views as custom views like CScrollEdit in Form.)
- The TScroller object itself is converted into an ODF FW_CScrollBarScroller and
- 1 or 2 scroll bar views are created. Scroll units are ignored.
-
- • TControl fields:
- Fields other then Default Choice and Text Style are ignored.
- IMPORTANT: the MacApp default button events are converted FW_kButtonPressedMsg.
- Of course you can also use your own message values.
-
- • TPopup fields:
- The label must be defined in a string list (Label field in AdLib). ODF won't
- read the label from the MENU resource itself like MacApp does.
-
- • TWindow fields:
- The only data converted from an LWindow object is its location and the presence
- of a grow box. (A grow box is always created in the bottom right corner of the
- frame and its view id is hard-coded to 'grow'.) The type of window cannot be
- used here because the frame's window already exists when its subviews are created.
-
- • TDialogView fields:
- Same as TWindow + the default and cancel button ids. The type of dialog window
- must be set by program in NewModalDialog().
-
- • LListBox fields:
- Horizontal Scrollbar and LDEF ID are not supported.
- The "Has Grow Box" flag is translated into "Multiple Selection" for ODF.
-
- • TEditText & TTEView fields:
- Only the maximum number of characters & text style are used.
- Form provides an example for converting TTEView to a custom CScrollEdit class.
-
- • TTextGridView & TTextListView fields:
- Both classes are mapped to FW_CListBox but ODF supports only 1 column text lists.
-
- • TPicture fields:
- The image size should remain 0, 0 in order to use the picture size by default.
- The PICT resource must be present in the same resource file.
-
-
- API REFERENCE
- -------------
-
- <To be documented later. Please see the code in Form and ViewTester for now>
-
-